package com.siderakis.orgunit.client.domain;

import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArray;
import com.google.gwt.core.client.JsonUtils;

public class OrgUnit extends JavaScriptObject {
  // public String name, description, path;

  public static JsArray<OrgUnit> unitsListFromJson(String json) {
    return JsonUtils.safeEval(json);
  }

  protected OrgUnit() {
  }

  public final native String getName()/*-{
		return this.name;
  }-*/;

  public final native String getDescription()/*-{
		return this.description;
  }-*/;

  public final native String getPath()/*-{
		return this.path;
  }-*/;

  public final native String getParentPath()/*-{
		return this.parentPath;
  }-*/;

  public final native boolean isOn()/*-{
		return this.on ? true : false;
  }-*/;

  public final native void setOn(boolean isOn) /*-{
		this.on = isOn;
  }-*/;

}
